//
//  OrganationSeekCell.m
//  ShangHaiTuJI
//
//  Created by xiaoxiangtuji on 2017/8/9.
//  Copyright © 2017年 xiaoxiangtuji. All rights reserved.
//

#import "OrganationSeekCell.h"
#import "CatagoryModel.h"

@implementation OrganationSeekCell


-(void)setModel:(CatagoryModel *)model{
    _model = model;
    UIImageView *imgeView = [[UIImageView alloc] init];
    [self.contentView addSubview:imgeView];
    [imgeView sd_setImageWithURL:[NSURL URLWithString:_model.imgPath] placeholderImage:[UIImage imageNamed:@""]];
    [imgeView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView);
        make.left.and.right.equalTo(self.contentView);
        make.height.mas_equalTo(scaleTopAndBottom(52));
    }];
//    imgeView.layer.cornerRadius = scaleTopAndBottom(26);
//    imgeView.layer.masksToBounds = YES;
    _nameLabel = [[UILabel alloc] init];
    _nameLabel.text = _model.name;
    _nameLabel.textAlignment = NSTextAlignmentCenter;
    _nameLabel.font = [UIFont systemFontOfSize:12];
    [self.contentView addSubview:_nameLabel];
    [_nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(imgeView.mas_bottom).offset(scaleTopAndBottom(9));
        make.left.and.right.equalTo(self.contentView);
        make.bottom.equalTo(self.contentView.mas_bottom).offset(scaleTopAndBottom(0));
    }];

}


@end
